R Robinson
Create a web page using R Markdown that features a map created with Leaflet.
Host your webpage on either GitHub Pages, RPubs, or NeoCities.
Your webpage must contain the date that you created the document, and it must contain a map created with Leaflet. We would love to see you show off your creativity! Review criteria
The datasource for this project is the geospatial data on all US hospitals from the Homeland Infrastructure Foundataion Level Data (HIFLD). The data can be downloaded from https://geoplatform.maps.arcgis.com/home/item.html?id=a2817bf9632a43f5ad1c6b0c153b0fab#overview
library(leaflet)
hospitals=read.csv2("./Hospital_List.csv", header=TRUE, dec=".", sep=",")
options(digits=7)
HospitalLocations <- data.frame(
name = hospitals$NAME,
type = hospitals$TYPE,
lat = as.numeric(hospitals$LATITUDE),
lng = as.numeric(hospitals$LONGITUDE))
leaflet(HospitalLocations) %>% addTiles() %>%
addMarkers(HospitalLocations$lng, HospitalLocations$lat, popup = paste(HospitalLocations$name, "<br>", HospitalLocations$type))